<?php

namespace app\api\controller;
use  app\common\controller\DBase;
use app\common\controller\PCBase;
use app\api\logic\FeiShuMessageLogic;
class FeiShuMessage extends DBase
{


    /**
     * @desc   获取app_token
     * @author xx
     * @date 2024-09-24
     */
    public function get_app_access_token(){
        $data   = $this->request->post();
        $res    = (new FeiShuMessageLogic())->get_app_access_token($data);
        return $this->jsonMessage(200,true,'获取成功',$res);
    }


    /**
     * @desc   飞书文本消息发送
     * @author xx
     * @date 2024-09-25
     */
    public function send_message(){
        $data   = $this->request->post();
        return  (new FeiShuMessageLogic())->send_message($data);
    }


    /**
     * @desc   获取飞书在线表格数据
     * @author luckyXiong
     * @date   2024-10-24
     */
    public function getTablerecordsPurchase(){
        $data   = $this->request->post();
        return  (new FeiShuMessageLogic())->getTablerecords($data);
    }


    /**
     * @desc   获取飞书在线表格数据
     * @author luckyXiong
     * @date   2024-10-24
     */
    public function getTablerecordsArrive(){
        $data   = $this->request->post();
        return  (new FeiShuMessageLogic())->get_tablerecords_arrive($data);
    }


    /**
     * @desc   获取飞书在线表格数据
     * @author luckyXiong
     * @date   2024-10-24
     */
    public function getTablerecordsPants(){
        $data   = $this->request->post();
        return  (new FeiShuMessageLogic())->getTablerecordsPants($data);
    }


    /**
     * @desc   获取飞书员工状态数据
     * @author luckyXiong
     * @date   2024-10-30
     */
    public function getEmployees(){
        $data   = $this->request->post();
        $res    = (new FeiShuMessageLogic())->upEmployeesConsumer($data);
        return  $this->jsonMessage(200,true,'获取成功',$res);
    }


    /**
     * @desc   获取飞书员工信息
     * @author luckyXiong
     * @date   2025-04-28
     */
    public function getEmployeesList(){
        $data   = $this->request->post();
        $res    = (new FeiShuMessageLogic())->getEmployeesList();
        return  $this->jsonMessage(200,true,'获取成功','');
    }



    /**
     * @desc   获取运营广告花费数据
     * @author luckyXiong
     * @date   2024-12-23
     */
    public function getTablerecordsSpend(){
        $data   = $this->request->post();
        return  (new FeiShuMessageLogic())->getTablerecordsSpend($data);
    }


    /**
     * @desc   获取缺货明细列表数据
     * @author luckyXiong
     * @date   2025-06-20
     */
    public function stock_detail(){
        $data   = $this->request->get();
        (new FeiShuMessageLogic())->stock_detail($data);
        return $this->jsonMessage(200, true, "获取成功!",'');
    }

    /**
     * @desc   获取缺货明细列表数据
     * @author luckyXiong
     * @date   2025-06-20
     */
    public function get_stock_info(){
        $data   = $this->request->post();
        (new FeiShuMessageLogic())->get_stock_info($data);
        return      $this->jsonMessage(200,true,'操作成功',null);
    }








}